predict.py takes a pretrained model and yields predictions#172
Open
predict.py takes a pretrained model and yields predictions#172
Conversation
model.py: * latent drug embedding computation has been refactored, so that it consists of two steps: a) precomputed embedding lookup b) transformation into latent space * compute_covariate_embeddings_ - one-hot-covariates -> into latent space representation predict.py : new file, contains a predict function, that takes in gene expression data, drug embeddings, covariates, and a checkpoint, and returns predictinos of length correspond to cartesian product. this fie also contains example prepare script that shows how to do this for lincs, including combinatorial data. note: hte predict.py is kind of ugly, and i will refactor this later. in the end, predict.py should probably just contain the predict fn,and the example loading should move to a notebook
|
Hello, very good work; I recently tried to use your model to predict new data sets, but there seems to be no way to save preds directly inside the code. I'm glad you will update predcit.py later, but what I don't understand about this method is: Are "cached_control_genes.pt "and" cached_random_drug_embeddings.pt" generated when the model is training? I don't seem to have produced these two files when I train the model |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
model.py:
note: the predict.py has too big of a scope, and will need a bit more refactoring later. in the end, predict.py should probably just contain the predict fn,and the example loading should move to a notebook.